<? session_start(); ?>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<title>Login Page</title>
	<link rel="stylesheet" type="text/css" href="CSS/style.css" />
</head>


<body>
	<div id="header">
	<h1><strong>This Android Website of Testing Stuff</strong></h1>
		 	
		<?
	if($_SESSION['loggedIn'] == true) { ?>	

		<div class="usermenu">
			<br>
			<br>
			<a href="/usersettings.php">User Settings</a>
			<br>
			<a href="/logout.php">Logout</a>
		</div>
		

		<div id="user">
	<? echo''.$_SESSION['username'].'</div>';  } ?>
	</div>

	<div id="bottomcurve">
	</div>

	<div class="menubar">

		<div class="empty">
			<a href="index.php">
			<img src="empty.gif">
			</a>
		</div>

		<div class="menuhome">
			Home
		</div>	

		<? if ($_SESSION['loggedIn'] == true){ ?>

			<div class="empty2">
				<a href="speedpage.php">
				<img src="empty.gif">
				</a>
			</div>

			<div class="menulogin">
				Speed
			</div>
			
<? }else{ ?> 
			<div class="empty2">
				<a href="login.php">
				<img src="empty.gif">
				</a>
			</div>

			<div class="menulogin">
				Login
			</div>
		<? }?>	

		<div class="empty3">
			<a href="register.php">
			<img src="empty.gif">
			</a>
		</div>

		<div class="menuregister">
		Register
		</div>

		<div class="empty4">
			<a href="credits.php">
			<img src="empty.gif">
			</a>
		</div>

		<div class="menucredits">
		Credits
		</div>
	</div>

	<?
	if($_SESSION['loggedIn'] == true) { ?>	

		<div id="alreadyloggedin">
			You Are already logged in as <? echo''.$_SESSION['username'].''; ?>.
			<br>
			<br>
			Log out from the user menu, by mousing over your name and selecting logout
			to relog as a different person.
		</div>
	<? } else  { ?>
	
	<div id="login">
		<p align="center">
		<form name="input" action="checklogin.php" method="post">
		Username: <input type="text" name="username"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<br>
		Password: <input type="password" name="password"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<br>
		<p align="center"><input type="submit" value="Login"/>
		<br>
		<input type="checkbox" name="remember" value="Remember My Password"/> Remember Me
		</form>
	</div>
	<? } ?>
</body>
</html>